using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
namespace Net35.Xrm.Sdk.Client
{
	public sealed class CrossRealmIssuerEndpointCollection : DataCollection<System.Uri, IssuerEndpointDictionary>
	{
		public override IssuerEndpointDictionary this[System.Uri key]
		{
			get
			{
				if (base.ContainsKey(key))
				{
					return base[key];
				}
				IssuerEndpointDictionary issuerEndpointDictionary = ServiceMetadataUtility.RetrieveIssuerEndpoints(new System.ServiceModel.EndpointAddress(key, new System.ServiceModel.Channels.AddressHeader[0]));
				if (issuerEndpointDictionary != null)
				{
					base[key] = issuerEndpointDictionary;
					return issuerEndpointDictionary;
				}
				return null;
			}
			set
			{
				base[key] = value;
			}
		}
	}
}
